package xyz.syyrjx.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import xyz.syyrjx.entity.Order;
import xyz.syyrjx.entity.ResultInfo;
import xyz.syyrjx.entity.User;

import java.util.List;

/**
 * 远程mysql服务
 * @author Mr.Wan
 * @date 2022/10/11 - 20:09
 */
@FeignClient("mysql-remote-server")
public interface MysqlRemoteService {

    @RequestMapping("/order/getSelf")
    ResultInfo<List<Order>> getOrderSelf(@RequestBody User user);

    @RequestMapping("/user/login")
    ResultInfo<User> login(@RequestParam int id);
}
